
Import('check_env')

env = check_env.Clone()

# Include paths
env.Append(CPPPATH = Split('''
                              #/common
                              #/galerautils/src
                              #/gcomm/src
                           '''))

env.Prepend(LIBS=File('#/galerautils/src/libgalerautils.a'))
env.Prepend(LIBS=File('#/galerautils/src/libgalerautils++.a'))
env.Prepend(LIBS=File('#/gcomm/src/libgcomm.a'))

gcomm_check = env.Program(target = 'check_gcomm',
                          source = Split('''
                              check_fair_send_queue.cpp
                              check_gcomm.cpp
                              check_trace.cpp
                              check_types.cpp
                              check_util.cpp
                              check_evs2.cpp
                              check_pc.cpp
                           '''))

env.Test("gcomm_check.passed", gcomm_check)

Clean(gcomm_check, '#/check_gcomm.log')

# Non deterministic tests must be run manually.
Import('deterministic_tests all_tests')

check_gcomm_nondet = env.Program(target = "check_gcomm_nondet",
                                 source = [
                                     "check_gcomm_nondet.cpp",
                                     "check_gmcast.cpp",
                                     "check_pc_nondet.cpp",
                                     "check_util_nondet.cpp"
                                 ])
if not deterministic_tests and all_tests:
    env.Test("gcomm_check_nondet.passed", check_gcomm_nondet)
    Clean(check_gcomm_nondet, "#/check_gcomm_nondet.log")

ssl_test = env.Program(target = 'ssl_test',
                       source = ['ssl_test.cpp'])
